export function getFormat(num) {
  let date = new Date(num);  
  let year = date.getFullYear();
  let month = date.getMonth() + 1;
  let day = date.getDate();

  month = month<10?'0' + month:month;
  day = day<10?'0' + day:day;

  let str = year + '-' + month + '-' + day

  return str;
};

export function getFormatAll() {
  let date = new Date();  
  let year = date.getFullYear();
  let month = date.getMonth() + 1;
  let day = date.getDate();
  let hours = date.getHours();
  let minutes = date.getMinutes();
  let seconds = date.getSeconds();

  month = month<10?'0' + month:month;
  day = day<10?'0' + day:day;
  hours = hours<10?'0' + hours:hours;
  minutes = minutes<10?'0' + minutes:minutes;
  seconds = seconds<10?'0' + seconds:seconds;

  let str = year + '年' + month + '月' + day  + '日 ' + " " + hours + ":" + minutes +":" + seconds;

  return str;
};
